<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>教师提现详情</title>
    <link rel="stylesheet"th:href="@{/static/lib/bootstrap/bootstrap.min.css}">
    <script th:src="@{/static/lib/jquery/1.9.1/jquery.js}"></script>
    <script th:src="@{/static/lib/jquery.validation/1.14.0/jquery.validate.js}"></script>
    <script th:src="@{/static/lib/jquery.validation/1.14.0/messages_zh.js}"></script>
    <script th:src="@{/static/lib/vue.min.js}"></script>
    <script type="text/javascript" th:src="@{/static/lib/layer/2.4/layer.js}"></script>
</head>
<body>
<!--


-->

<div class="container">

    <form id="editUserForm">
        <br/>
        <div class="form-group" style="display: none">
            <label for="tixianid">提现id：</label>
            <input type="text" class="form-control" id="tixianid" name="username" th:value="${tixian.tixianId}" >
        </div>
        <div class="form-group">
            <label for="name">教师姓名：</label>
            <input type="text" class="form-control" id="name" name="username" th:value="${teacher.teacherName}">
        </div>
        <div class="form-group">
            <label for="zhanghao">支付宝账户：</label>
            <input type="password" class="form-control" id="zhanghao" name="username"  th:value="${teacher.teacherZhifubao}" >
        </div>
        <div class="form-group">
            <label for="money">提现金额：</label>
            <input type="text" class="form-control" id="money" name="userage" th:value="${tixian.tixianMoney}" >
        </div>
        <div class="form-group">
            <button type="button" id="saveBtn" class="btn btn-success">提现</button>
            <button type="button" id="cancelBtn" class="btn btn-default">取消</button>
        </div>
    </form>
</div>

<script>
    /**
     * LYT 加载教师提现详情，管理员提现成功后，更新提现状态为已处理、并插入提现处理时间
     */
    var updateStatus = function(){
        $.ajax({
            type: "POST",
            dataType: "json",
            url: '/updateStatus?id='+$("#tixianid").val(),
            success: function(){
                $('#cancelBtn').click();
            }
        });
    }

    $("#saveBtn").click(function () {
        layer.confirm('确定提现？提现之后不可回退',{
            btn:['确定','取消']
        },function () {
            updateStatus()
        },function () {
            layer.close()
        })

    });
  $("#cancelBtn").click(function () {
      window.parent.location.reload();
      parent.layer.close(index);
  })

</script>

</body>
</html>
